#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<iostream>

using namespace std;

vector<int> mergeSortedArray(vector<int>& a, vector<int>& b)
{
    vector<int> v;
    int begin1 = 0, end1 = a.size();
    int begin2 = 0, end2 = b.size();
    while (begin1 < end1 && begin2 < end2)
    {
        if (a[begin1] < b[begin2])
        {
            v.push_back(a[begin1++]);
        }
        else
        {
            v.push_back(b[begin2++]);
        }
    }
    while (begin1 < end1)
    {
        v.push_back(a[begin1++]);
    }
    while (begin2 < end2)
    {
        v.push_back(b[begin2++]);
    }
    return v;
}